<?php

namespace App\Api\Controllers;

use Illuminate\Http\Request;
use App\Models\SendIncome;

class SetController extends Controller
{
    public function index(){
        return $this->success([
            'btc_price' => \Cache::get('btc_price'),
            'suanli' => \Cache::get('suanli')
        ]);
    }

    public function counter(SendIncome $sendIncome){
        $income = $sendIncome->orderBy('id','desc')->first('income');
        return $this->success([
           'btc_price' =>  \Cache::get('btc_price'),
            'income' => $income['income'],
        ]);
    }
}
